// import Vue from 'vue'
import Router from 'vue-router'
const Login = () => import('@/components/Login')
const Index = () => import('@/components/Index')
const HomePage = () => import('@/components/HomePage')
/* setting */
const Staff = () => import('@/components/setting/Staff')
const CompanyInformation = () => import('@/components/setting/CompanyInformation')
const AccountInformation = () => import('@/components/AccountInformation')
const MenuFunction = () => import('@/components/setting/MenuFunction')
const SupplySetting = () => import('@/components/setting/SupplySetting')
const AddSuppliers = () => import('@/components/setting/add_suppliers/AddSuppliers')
const AddAccount = () => import('@/components/setting/staff/AddAccount')
const EditAccount = () => import('@/components/setting/staff/EditAccount')
const EditSuppliers = () => import('@/components/setting/edit_suppliers/EditSuppliers')
const CommissionSetting = () => import('@/components/setting/commission/CommissionSetting')
/* common */
const Account = () => import('@/components/common/Account')
/* hotel */
const HotelInformation = () => import('@/components/hotel/HotelInformation')
const AddHotel = () => import('@/components/hotel/add_hotel/AddHotel')
const Updatehotel = () => import('@/components/hotel/add_hotel/Updatehotel')
const HotelBasic = () => import('@/components/hotel/add_hotel/HotelBasic')
const HotelFacilities = () => import('@/components/hotel/add_hotel/HotelFacilities')
const HotelPolicy = () => import('@/components/hotel/add_hotel/HotelPolicy')
const SurroundingFacilities = () => import('@/components/hotel/add_hotel/SurroundingFacilities')
const HotelPicture = () => import('@/components/hotel/add_hotel/HotelPicture')
const SaleHotelList = () => import('@/components/hotel/sale_hotel/SaleHotelList')
const AddSaleHotelList = () => import('@/components/hotel/sale_hotel/AddSaleHotelList')

/* room */
const RoomList = () => import('@/components/room/RoomList')
const AddRoom = () => import('@/components/room/add_room/AddRoom')
const RoomBasic = () => import('@/components/room/add_room/RoomBasic')
const RoomFacilities = () => import('@/components/room/add_room/RoomFacilities')
const RoomPicture = () => import('@/components/room/add_room/RoomPicture')
const RoomManagement = () => import('@/components/room/room_list/RoomManagement')
const PropertyManagement = () => import('@/components/room/room_list/PropertyManagement')
const RoomLog = () => import('@/components/room/RoomLog')
const RoomUpdate = () => import('@/components/room/RoomUpdate')
const RoomCreate = () => import('@/components/room/RoomCreat')
const UploadRoomPage = () => import('@/components/common/uploadRoomPage.vue')

/* order-form */
const OrderForm = () => import('@/components/order-form/index')
const OrderDetail = () => import('@/components/order-form/detail')
const AddDetail = () => import('@/components/order-form/add')
//const financeList = () => import('@/components/finance')
const FinanceCenter = () => import('@/components/finance')

/* message */
const Message = () => import('@/components/message/Message')

/** upload */
const UploadPage = () => import('@/components/common/uploadPage.vue')

/** check-in 入住**/
const CheckInList = () => import('@/components/check-in/checkList')
const CheckInDetail = () => import('@/components/check-in/checkDetail')

/****销售政策 */
const HotelSellPolicy = () => import('@/components/setting/sales_policy/hotelPolicy')
const ThirdSellPolicy = () => import('@/components/setting/sales_policy/thirdPolicy')

/**分销中心 */

const SaleCenter = () => import('@/components/sale')
//营业额查询

const TurnoverEnquiry = () => import('@/components/turnoverEnquiry')

// 账单查询
const BillChecking = () => import('@/components/billChecking')
// Vue.use(Router)

//平台活动配置
const PlatforActivity = () => import('@/components/platformActivity')

// 活动配置
/**活动配置 */
const Activity = () => import('@/components/activity/Activity');
const ActivityConfig = () => import('@/components/activity/ActivityConfig')

/***合作模式 */
const Mode = () => import('@/components/mode');

// 图片轮播管理

const Carousel = () => import('@/components/system-config/carousel')
//商圈管理
const TradingArea = () => import('@/components/system-config/tradingArea')

//会员管理

const Member = () => import('@/components/member')
const FxList = () => import('@/components/member/fxList')
const EditMember = () => import('@/components/member/memberDetail')
const OrderMemberDetail = () => import('@/components/member/orderDetail')

//优惠券
const CouponTemplate = () => import('@/components/coupon');
const CouponAdd = () => import('@/components/coupon/add')

const CouponQuery = () => import('@/components/coupon/query');

//优惠券活动

const CouponActivity = () => import('@/components/coupon-activity/index');
const CouponAddEdit = () => import('@/components/coupon-activity/add-edit');
const GrantList = () => import('@/components/coupon-activity/grantList')
const SupDetail = () => import('@/components/member/supDetail')
let router = new Router({
  routes: [{
      path: '/',
      name: 'main',
      component: Login,
      meta: {
        isToken: true
      }
    },
    {
      path: '/index',
      name: 'Index',
      component: Index,
      children: [{
          path: 'bill-checking',
          component: BillChecking
        },
        {
          path: 'coupon-template',
          component: CouponTemplate
        },
        {
          path: 'coupon-add',
          component: CouponAdd
        },
        {
          path: 'coupon-query',
          component: CouponQuery
        },
        {
          path: 'coupon-activity',
          component: CouponActivity
        },
        {
          path: 'coupon-add-edit',
          component: CouponAddEdit
        },
        {
          path: 'grant-list',
          component: GrantList
        },
        {
          path: 'turnover-enquiry',
          component: TurnoverEnquiry
        },
        {
          path: 'sale_center',
          component: SaleCenter
        },
        {
          path: 'hotelSellPolicy',
          component: HotelSellPolicy
        },
        {
          path: 'thirdSellPolicy',
          name: 'ThirdSellPolicy',
          component: ThirdSellPolicy
        },
        {
          path: 'platfor_activity',
          name: 'PlatforActivity',
          component: PlatforActivity
        },
        {
          path: 'activity',
          name: 'Activity',
          component: Activity
        },
        {
          path: 'activity_config',
          name: 'ActivityConfig',
          component: ActivityConfig
        },
        {
          path: 'fxList',
          name: 'FxList',
          component: FxList
        },
        {
          path: 'memberDetail',
          name: 'memberDetail',
          component: EditMember
        },
        {
          path: 'orderDetail',
          component: OrderMemberDetail
        },
        {
          path: 'supDetail',
          component: SupDetail
        },
        {
          path: 'mode',
          name: 'mode',
          component: Mode
        },
        {
          path: 'staff',
          name: 'Staff',
          component: Staff
        },
        {
          path: 'company_information',
          name: 'CompanyInformation',
          component: CompanyInformation
        },
        {
          path: 'account_information',
          name: 'AccountInformation',
          component: AccountInformation
        },
        {
          path: 'menu_function',
          name: 'MenuFunction',
          component: MenuFunction
        },
        {
          path: 'supply_setting',
          name: 'SupplySetting',
          component: SupplySetting
        },
        {
          path: 'add_suppliers',
          name: 'AddSuppliers',
          component: AddSuppliers
        },
        {
          path: 'add_account',
          name: 'AddAccount',
          component: AddAccount
        },
        {
          path: 'log',
          name: 'Log',
          component: Account
        },
        {
          path: 'hotel_information',
          name: 'HotelInformation',
          component: HotelInformation
        },
        {
          path: 'check-in',
          name: 'checkIn',
          component: CheckInList
        },
        {
          path: 'checkIn-detail',
          name: 'checkDetail',
          component: CheckInDetail
        },
        {
          path: 'add_hotel',
          name: 'AddHotel',
          component: AddHotel
        },
        {
          path: 'edit_hotel/:id',
          name: 'Updatehotel',
          component: Updatehotel
        },
        {
          path: 'hotel_basic',
          name: 'HotelBasic',
          component: HotelBasic
        },
        {
          path: 'hotel_facilities',
          name: 'HotelFacilities',
          component: HotelFacilities
        },
        {
          path: 'hotel_policy',
          name: 'HotelPolicy',
          component: HotelPolicy
        },
        {
          path: 'surrounding_facilities',
          name: 'SurroundingFacilities',
          component: SurroundingFacilities
        },
        {
          path: 'hotel_picture',
          name: 'HotelPicture',
          component: HotelPicture
        },
        {
          path: 'room_list/:id',
          name: 'RoomList',
          component: RoomList
        },
        {
          path: 'RoomUpdate',
          name: 'RoomUpdate',
          component: RoomUpdate
        },
        {
          path: 'add_room',
          name: 'AddRoom',
          component: AddRoom
        },
        {
          path: 'room_basic',
          name: 'RoomBasic',
          component: RoomBasic
        },
        {
          path: 'room_facilities',
          name: 'RoomFacilities',
          component: RoomFacilities
        },
        {
          path: 'roomCreate',
          name: 'RoomCreate',
          component: RoomCreate
        },
        {
          path: 'room_picture',
          name: 'RoomPicture',
          component: RoomPicture
        },
        {
          path: 'sale_hotel',
          name: 'SaleHotelList',
          component: SaleHotelList
        },
        {
          path: 'add_sale_hotel',
          name: 'AddSaleHotelList',
          component: AddSaleHotelList
        },
        {
          path: 'edit_account',
          name: 'EditAccount',
          component: EditAccount
        },
        {
          path: 'property_management',
          name: 'PropertyManagement',
          component: PropertyManagement
        },
        {
          path: 'room_management',
          name: 'RoomManagement',
          component: RoomManagement
        },
        {
          path: 'order_form',
          name: 'orderForm',
          component: OrderForm
        },
        {
          path: 'order_detail',
          name: 'orderDetail',
          component: OrderDetail
        },
        {
          path: 'order_add',
          name: 'AddDetail',
          component: AddDetail
        },
        {
          path: 'finance-center',
          component: FinanceCenter
        },
        {
          path: 'edit_suppliers',
          name: 'EditSuppliers',
          component: EditSuppliers
        },
        {
          path: 'message',
          name: 'Message',
          component: Message
        },
        {
          path: 'commission_setting',
          name: 'CommissionSetting',
          component: CommissionSetting
        },
        {
          path: 'room_log',
          name: 'RoomLog',
          component: RoomLog
        },
        {
          path: 'uploadPage',
          name: 'uploadPage',
          component: UploadPage
        },
        {
          path: 'uploadRoomPage',
          component: UploadRoomPage
        },
        {
          path: 'carousel',
          component: Carousel
        },
        {
          path: 'trading-area',
          component: TradingArea

        },
        {
          path: 'member',
          component: Member
        }
      ]
    }
  ]
})

export default router
